<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile
/** @var \Magento\Vault\Block\CreditCards $block */
$tokens = $block->getPaymentTokens();
?>
<?php if (count($tokens) !== 0): ?>
    <div class="table-wrapper my-credit-cards">
        <table class="data table table-credit-cards" id="my-orders-table">
            <caption class="table-caption"><?php /* @noEscape */ echo __('My Credit Cards') ?></caption>
            <thead>
            <tr>
                <th scope="col" class="col card-number"><?php /* @noEscape */ echo __('Card Number') ?></th>
                <th scope="col" class="col expire"><?php /* @noEscape */ echo __('Expiration Date') ?></th>
                <th scope="col" class="col card-type"><?php /* @noEscape */ echo __('Type') ?></th>
                <th scope="col" class="col actions">&nbsp;</th>
            </tr>
            </thead>
            <tbody>
            <?php
            foreach ($tokens as $token) {
                echo $block->renderTokenHtml($token);
            }
            ?>
            </tbody>
        </table>
    </div>

<?php else: ?>
    <div class="message info empty"><span><?php /* @noEscape */ echo __('You have no credit cards.'); ?></span></div>
<?php endif ?>
